module ALUOutSel (
    input logic [31:0]ALU_Out,
    input logic [31:0]HI_Data,
    input logic [31:0]LO_Data,
    input logic [31:0]EXE_Instr,

    output logic [31:0]ALU_Out_End
);
    //选择EXE最终输出
    //若要写入HI 或 LO则分别选择HI LO寄存器的值
    always_comb begin
        if(EXE_Instr[31:26] == 6'b000000 && EXE_Instr[5:0] == 6'b010000)
            ALU_Out_End = HI_Data;
        else if(EXE_Instr[31:26] == 6'b000000 && EXE_Instr[5:0] == 6'b010010)
            ALU_Out_End = LO_Data;
        else
            ALU_Out_End = ALU_Out;
    end
endmodule